pragma solidity ^0.8.10;
contract ArrayContract {
uint[2] fixedSizeArray;
uint[] dynamicSizeArray;
constructor() public {
fixedSizeArray[0] = 10;
fixedSizeArray[1] = 20;
fixedSizeArray[2] = 30;
dynamicSizeArray[0] = 10;
dynamicSizeArray[1] = 20;
dynamicSizeArray[2] = 30;
}
}
A. No issue at all, the code would run and populate both arrays
B. The code would throw a compilation error as Solidity does not
support dynamic array
C. The code would throw a compilation error as fixed array of size
2 can’t be assigned a third value
D. The code would compile but would throw a runtime error as
fixed array of size 2 can’t be assigned a third value
Q68: What are the values that we can set in the following contract in
the setScheduleMeeting function?
// SPDX-License-Identifier: SOME IDENTIFIER
pragma solidity ^0.8.10;
contract MeetingSchedule {
enum Day
{
Monday,
Tuesday,
Wednesday,
Thursday,
Friday